package com.cf.r964;

import java.io.*;

public class c {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StreamTokenizer in = new StreamTokenizer(br);
        PrintWriter out = new PrintWriter(System.out);
        in.nextToken(); int t = (int) in.nval;
        while (t-- > 0) {
            in.nextToken(); int n = (int) in.nval;
            in.nextToken(); int s = (int) in.nval;
            in.nextToken(); int m = (int) in.nval;
            boolean ans = false;
            int pre = 0;
            for (int i = 0; i < n; i++) {
                in.nextToken(); int l = (int) in.nval;
                in.nextToken(); int r = (int) in.nval;
                if (l - pre >= s) {
                    ans = true;
                }
                pre = r;
            }
            if (ans) {
                out.println("Yes");
            } else {
                if (pre < m && m - pre >= s) {
                    out.println("Yes");
                } else {
                    out.println("No");
                }
            }
        }
        out.flush();
        out.close();
        br.close();
    }
}
